package com.cupdata.zicon.jdk7concurrent.chapter1;

import java.util.Date;
import java.util.concurrent.TimeUnit;

public class FileClock implements Runnable {

	@Override
	public void run() {
		for (int i = 0; i < 10; i++) {
			System.out.printf("%s\n", new Date()+Thread.currentThread().getName());
			try {
				TimeUnit.SECONDS.sleep(1);
			} catch (InterruptedException e) {
				System.out.printf(Thread.currentThread().getName() + " The FileClock has been interrupted");
			}
		}

	}

}
